# Please install OpenAI SDK first: `pip3 install openai`


# 在线调用deepseek的chat接口

from openai import OpenAI

# client = OpenAI(api_key="sk-3425fed5d0734e7487c10534b823ebbd", base_url="https://api.deepseek.com/v1")

# response = client.chat.completions.create(
#     model="deepseek-chat",
#     messages=[
#         {"role": "system", "content": "You are a helpful assistant"},
#         {"role": "user", "content": "Hello"},
#     ],
#     stream=False
# )

# print(response.choices[0].message.content)


client = OpenAI(api_key="hk-qct9431000054586fa8d4984b851b9b1a8c2c9ebf336656b", base_url="https://api.openai-hk.com/v1")

response = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "Hello"},
    ],
    stream=False
)

print(response.choices[0].message.content)